﻿  <!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        会员管理

    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">会员管理</a></li>

    </ol>
</section>

<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">

                <div class="box-body">

                    <table width="100%" cellspacing="0" class="search_form">
                        <tbody>
                            <tr>
                                <td>
                                    <div class="explain_col">


                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>

                    <div class="navbar-form navbar-left" role="search">
                        <div class="form-group">




                            <select name="level" id="level" class="form-control">
                                <option value="" selected="selected">帐号类型</option>
                                <option value="0">公司</option>
                                <option value="1">员工</option>
                              
                            </select>

                            <input name="keywords" id="keywords" type="text" class="form-control" placeholder="关键字" size="25" value="" />





                        </div>
                        <button type="button" class="btn btn-default" onclick="search()">查询</button>
                        <input type="button" class="btn" value="添加帐号" onclick="showdiageedit(0)" />
                      

                    </div>


                    
                    <table width="100%" class="table table-bordered table-striped table-hover">
                        <tr>
                            <th align="center"><span>账号名</span></th>
                            <th align="center"><span>公司名称</span></th>
                            <th align="center"><span>账号级别</span></th>
                            <th align="center"><span>联系人</span></th>
                            <th align="center"><span>联系方式</span></th>
                            <th align="center"><span>创建时间</span></th>
                            <th align="center"><span>状态</span></th>
                            <th align="center"><span>结算比例</span></th>

                            <th style=" width:80px" align="center"><span>操作</span></th>



                        </tr>

                        @{
                            List<PhoneCard.Entities.TuiUsers> list = ViewBag.list;
                        }
                        @foreach (var a in list)
                        {

                        <tr>
                            <td><input type="checkbox" value="@a.id">@a.userName</td>

                            <td>@a.company</td>
                            <td>@a.userType</td>
                            <td style="width:130px">@a.linkMan</td>
                            <td>@a.contactInfo</td>
                            <td>@a.create_time</td>
                            <td>@a.stateFlag</td>

                            <td>
                                3

                            </td>
                            <td>
                                3

                            </td>


                        </tr>
                        }

                    </table>







                </div><!-- /.box-body -->
            </div><!-- /.box -->


        </div><!-- /.col -->
    </div><!-- /.row -->
</section><!-- /.content -->


<div id="formModal" class="modal fade">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="modal-title"></h4>
            </div>
            <div class="modal-body">
                <iframe id="idframe" src="user_edit.aspx" style="width:100%;height:480px; border:0px"></iframe>
            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->






<style>

    .pagination > li > span.active {
        color: orangered;
    }
</style>
<script type="text/javascript">

          function search()
          {


              level = $("#level").val();
              keywords = $("#keywords").val();

              location.href = "?level=" + level + "&keywords=" + keywords;
             // alert(start);
          }
          function load()
          {

              $("#level").val("<%=level %>");


              $("#keywords").val("<%=keywords %>");
          }

          $(document).ready(function () {
              load();
              $("#iduser").addClass("active");
           
          });

    function showdiageedit() {
        location.href = "UserEdit";
        }
          function showdiage(cid) {

                  $('#modal-title').html("修改等级");
                  $('#idframe').attr('src', "user_edit.aspx?id=" + cid + "&r=" + Math.random());
                  $('#formModal').modal('show');


          }
          function refush() {
              alert("操作成功");
              location.href = location.href;
          }

</script>